package com.cqgc.service.impl;


import com.cqgc.dao.ColonyDao;
import com.cqgc.domain.Colony;
import com.cqgc.domain.PageHelper;
import com.cqgc.service.ColonyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class ColonyServiceImpl implements ColonyService {
    @Autowired
    private ColonyDao dao;

    @Override
    public int delColony(Colony colony) {
        return dao.delColony(colony);
    }

    @Override
    public int stopUse(Colony colony) {
        return dao.stopUse(colony);
    }

    @Override
    public int update(Colony colony) {
        return dao.update(colony);
    }

    @Override
    public int addColony(Colony colony) {
        return dao.addColony(colony);
    }

    @Override
    public List<Colony> findByFather(int fid) {
        return dao.findByFather(fid);
    }

    @Override
    public List<Colony> findAll() {
        return dao.findAll();
    }

    @Override
    public List<Colony> findGood() {
        return dao.findGood(2);
    }

    @Override
    public List<Colony> findStop() {
        return dao.findStop(1);
    }

    @Override
    public List<Colony> searchC(String colony) {
        return dao.searchC(colony);
    }


    @Override
    public List<Colony> findPage(PageHelper pageHelper) {
        return dao.findpage(pageHelper);
    }
}
